package com.example.demo.validation;

import java.math.BigDecimal;

import javax.validation.constraints.Min;
import javax.validation.constraints.NotBlank;

public class UserParams {
	
	private String user_code;
	
	@NotBlank(message="名称不能为空")
	private String name;
	
	@NotBlank(message="昵称不能为空")
	private String nickname;
	
	@Min(value=0, message="请输入正确的年龄")
	private Integer age;
	
	@Min(value=0, message="请输入正确金额")
	private BigDecimal amount;

	private Boolean is_vip;

	public String getUser_code() {
		return user_code;
	}

	public void setUser_code(String user_code) {
		this.user_code = user_code;
	}

	public String getName() {
		return name;
	}

	public String getNickname() {
		return nickname;
	}

	public void setNickname(String nickname) {
		this.nickname = nickname;
	}

	public void setName(String name) {
		this.name = name;
	}

	public Integer getAge() {
		return age;
	}

	public void setAge(Integer age) {
		this.age = age;
	}

	public BigDecimal getAmount() {
		return amount;
	}

	public void setAmount(BigDecimal amount) {
		this.amount = amount;
	}

	public Boolean getIs_vip() {
		return is_vip;
	}

	public void setIs_vip(Boolean is_vip) {
		this.is_vip = is_vip;
	}

	@Override
	public String toString() {
		return "UserParams [user_code=" + user_code + ", name=" + name + ", nickname=" + nickname + ", age=" + age
				+ ", amount=" + amount + ", is_vip=" + is_vip + "]";
	}
	
}
